#ifdef WIN32
#  include <windows.h>
cell winerr(cell t);
char *winerrmsg(void);
#  define DYNLIB(x)   x
#  define dlopen(s)   winerr((cell)LoadLibrary(s))
#  define dlsym(h, s) winerr((cell)GetProcAddress(h, s))
#  define dlclose(x)  !winerr((cell)FreeLibrary(x))
#  define dlerror()   winerrmsg()
#else
#  include "dlfcn.h"
#  define DYNLIB(x)  x, RTLD_LAZY
#endif
